Regression Analysis

library(readxl)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(devtools)
## Loading required package: usethis
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2
## ──
## ✔ ggplot2 3.4.0     ✔ purrr   1.0.1
## ✔ tibble  3.1.8     ✔ stringr 1.5.0
## ✔ tidyr   1.3.0     ✔ forcats 1.0.0
## ✔ readr   2.1.3     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(ggbiplot)
## Loading required package: plyr
## ------------------------------------------------------------------------------
## You have loaded plyr after dplyr - this is likely to cause problems.
## If you need functions from both plyr and dplyr, please load plyr first, then dplyr:
## library(plyr); library(dplyr)
## ------------------------------------------------------------------------------
## 
## Attaching package: 'plyr'
## 
## The following object is masked from 'package:purrr':
## 
##     compact
## 
## The following objects are masked from 'package:dplyr':
## 
##     arrange, count, desc, failwith, id, mutate, rename, summarise,
##     summarize
## 
## Loading required package: scales
## 
## Attaching package: 'scales'
## 
## The following object is masked from 'package:purrr':
## 
##     discard
## 
## The following object is masked from 'package:readr':
## 
##     col_factor
## 
## Loading required package: grid
library(ggplot2)
library(GGally)
## Registered S3 method overwritten by 'GGally':
##   method from   
##   +.gg   ggplot2
library(mice) # for inputation
## 
## Attaching package: 'mice'
## 
## The following object is masked from 'package:stats':
## 
##     filter
## 
## The following objects are masked from 'package:base':
## 
##     cbind, rbind
library(ggmice) # for inputation
## 
## Attaching package: 'ggmice'
## 
## The following objects are masked from 'package:mice':
## 
##     bwplot, densityplot, stripplot, xyplot
library(scales)
#install.packages("corrplot")
library(corrplot)
## corrplot 0.92 loaded
library(writexl)

### Importing datasets
df <- read_excel("data_2000.xlsx")

z-score function

z_score <- function(x){
  zscore= ((x - mean(x, na.rm = TRUE))/sd(x, na.rm = TRUE))
zscore
}
df$employees_2001_norm <- z_score(df$employees_2001)
df$air_quality_norm <- z_score(df$air_quality)
df$water_quality_norm <- z_score(df$water_quality)
df$built_quality_norm <- z_score(df$built_quality)
df$land_quality_norm <- z_score(df$land_quality)
df$impervious_surface_norm <- z_score(df$impervious_surface)

##Plotting ## Causality_log and Property Damage log

################### causality  plot ################################
causality <- ggplot(df, aes(causality_log))
causality + geom_histogram(binwidth = 0.8)  ### left-skewed

################### Crop & Property Damage log ################################
crop_property_damage_log<- ggplot(df, aes(prop_dmg_log))
crop_property_damage_log + geom_histogram(binwidth = 1)

CAUSALITY

Social Dimension and Causality

### social dimension  VS causality log normalized plot
cor.test(df$causality_log, df$per_white_norm) #okay # remove due to highly correlation with black and per_female_hh_with_kids_under18_norm
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_white_norm
## t = -7.862, df = 3131, p-value = 5.159e-15
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1733121 -0.1046292
## sample estimates:
##       cor 
## -0.139138
cor.test(df$causality_log, df$per_black_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_black_norm
## t = 6.6155, df = 3131, p-value = 4.338e-11
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.08273233 0.15180514
## sample estimates:
##       cor 
## 0.1174107
cor.test(df$causality_log, df$per_hispanic_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_hispanic_norm
## t = 2.4489, df = 3131, p-value = 0.01438
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.008718297 0.078621690
## sample estimates:
##        cor 
## 0.04372351
cor.test(df$causality_log, df$per_asian_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_asian_norm
## t = 12.189, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1791658 0.2460336
## sample estimates:
##       cor 
## 0.2128489
cor.test(df$causality_log, df$per_american_indian_norm)#okay 
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_american_indian_norm
## t = -2.6085, df = 3131, p-value = 0.009137
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.08145317 -0.01156774
## sample estimates:
##         cor 
## -0.04656744
cor.test(df$causality_log, df$per_other_races_norm)#okay# remove bc highly correlated with hispanci
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_other_races_norm
## t = 3.6347, df = 3131, p-value = 0.0002828
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.02986945 0.09961266
## sample estimates:
##        cor 
## 0.06482021
cor.test(df$causality_log, df$per_POC_norm)#okay # remove bc highly correlated with hispanic
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_POC_norm
## t = 8.1353, df = 3131, p-value = 5.862e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1094090 0.1779981
## sample estimates:
##       cor 
## 0.1438764
cor.test(df$causality_log, df$per_elderly_norm) #okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_elderly_norm
## t = -11.225, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2301163 -0.1627853
## sample estimates:
##        cor 
## -0.1966827
cor.test(df$causality_log, df$per_young_dependent_norm)  #okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_young_dependent_norm
## t = 9.4373, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1320596 0.2001619
## sample estimates:
##       cor 
## 0.1663091
cor.test(df$causality_log, df$per_noenglish_norm)# #okay highly correlated with hispanic
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_noenglish_norm
## t = 4.1535, df = 3131, p-value = 3.361e-05
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.03910854 0.10876235
## sample estimates:
##        cor 
## 0.07402573
cor.test(df$causality_log, df$per_foreign_born_norm)##okay highly correlated with per_noenglish_norm
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_foreign_born_norm
## t = 12.312, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1812318 0.2480387
## sample estimates:
##       cor 
## 0.2148866
cor.test(df$causality_log, df$per_female_hh_with_kids_under6_norm)##okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_female_hh_with_kids_under6_norm
## t = 9.7971, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1382804 0.2062368
## sample estimates:
##       cor 
## 0.1724638
cor.test(df$causality_log, df$per_female_hh_with_kids_under18_norm)#okay # remove bc highly correlated with black, white, and per_female_hh_with_kids_under6_norm
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_female_hh_with_kids_under18_norm
## t = 10.804, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1556022 0.2231250
## sample estimates:
##       cor 
## 0.1895877
cor.test(df$causality_log, df$per_rural_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_rural_norm
## t = -22.66, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.4050543 -0.3448746
## sample estimates:
##      cor 
## -0.37536
cor.test(df$causality_log, df$per_no_schooling_completed_norm) #not statistically significant
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_no_schooling_completed_norm
## t = -0.21186, df = 3131, p-value = 0.8322
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.03879955  0.03123657
## sample estimates:
##          cor 
## -0.003786128
X<-df%>%
  select(
         per_black_norm,
              per_hispanic_norm,
         per_asian_norm,
         per_american_indian_norm,
         per_elderly_norm,
         per_young_dependent_norm,
         per_female_hh_with_kids_under6_norm,
         per_rural_norm) 
        
ggpairs(X)

social_causality <- lm(causality_log~(per_black_norm+per_hispanic_norm + per_asian_norm + per_american_indian_norm+per_elderly_norm+per_young_dependent_norm+per_female_hh_with_kids_under6_norm+per_rural_norm)+
                        log_pop_2000+numb_haz_log+state,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(social_causality)
## 
## Call:
## lm(formula = causality_log ~ (per_black_norm + per_hispanic_norm + 
##     per_asian_norm + per_american_indian_norm + per_elderly_norm + 
##     per_young_dependent_norm + per_female_hh_with_kids_under6_norm + 
##     per_rural_norm) + log_pop_2000 + numb_haz_log + state, data = df, 
##     na.rm = TRUE)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.4675 -0.6622 -0.1015  0.5503  4.2298 
## 
## Coefficients:
##                                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                         -3.962809   0.329789 -12.016  < 2e-16 ***
## per_black_norm                       0.080356   0.032138   2.500 0.012460 *  
## per_hispanic_norm                    0.050759   0.043115   1.177 0.239162    
## per_asian_norm                      -0.014745   0.030357  -0.486 0.627195    
## per_american_indian_norm             0.050085   0.024857   2.015 0.043997 *  
## per_elderly_norm                     0.012879   0.026832   0.480 0.631263    
## per_young_dependent_norm            -0.064487   0.028920  -2.230 0.025833 *  
## per_female_hh_with_kids_under6_norm -0.058587   0.028691  -2.042 0.041239 *  
## per_rural_norm                      -0.004023   0.032960  -0.122 0.902855    
## log_pop_2000                         0.435251   0.025530  17.048  < 2e-16 ***
## numb_haz_log                         0.671038   0.049461  13.567  < 2e-16 ***
## stateAL                              0.249385   0.283598   0.879 0.379275    
## stateAR                             -0.122366   0.276914  -0.442 0.658600    
## stateAZ                              0.078229   0.350577   0.223 0.823438    
## stateCA                             -0.719288   0.278574  -2.582 0.009868 ** 
## stateCO                              0.090022   0.275563   0.327 0.743929    
## stateCT                             -1.120171   0.424922  -2.636 0.008427 ** 
## stateDE                              0.439379   0.609087   0.721 0.470735    
## stateFL                             -0.141180   0.283399  -0.498 0.618402    
## stateGA                             -0.580705   0.266312  -2.181 0.029293 *  
## stateIA                             -0.715845   0.271427  -2.637 0.008398 ** 
## stateID                              0.017743   0.289466   0.061 0.951127    
## stateIL                             -0.263676   0.270531  -0.975 0.329804    
## stateIN                             -0.601718   0.272658  -2.207 0.027398 *  
## stateKS                             -0.115184   0.268695  -0.429 0.668186    
## stateKY                             -0.387356   0.267699  -1.447 0.148004    
## stateLA                             -0.449351   0.284202  -1.581 0.113958    
## stateMA                             -0.792194   0.361275  -2.193 0.028399 *  
## stateMD                             -0.308800   0.320071  -0.965 0.334729    
## stateME                             -0.590307   0.352538  -1.674 0.094145 .  
## stateMI                             -0.678552   0.273464  -2.481 0.013143 *  
## stateMN                             -0.565086   0.271648  -2.080 0.037589 *  
## stateMO                              0.225009   0.268384   0.838 0.401881    
## stateMS                             -0.285991   0.282416  -1.013 0.311304    
## stateMT                              0.135031   0.276038   0.489 0.624751    
## stateNC                             -0.815237   0.272282  -2.994 0.002775 ** 
## stateND                             -0.446251   0.278947  -1.600 0.109752    
## stateNE                             -0.245032   0.270418  -0.906 0.364943    
## stateNH                             -0.263508   0.396038  -0.665 0.505869    
## stateNJ                             -0.169063   0.329294  -0.513 0.607701    
## stateNM                             -0.664718   0.306955  -2.166 0.030425 *  
## stateNV                              0.336950   0.337046   1.000 0.317527    
## stateNY                             -0.904242   0.281914  -3.208 0.001353 ** 
## stateOH                             -1.038442   0.275225  -3.773 0.000164 ***
## stateOK                             -0.435769   0.263020  -1.657 0.097664 .  
## stateOR                             -0.778523   0.295890  -2.631 0.008553 ** 
## statePA                             -0.707476   0.283662  -2.494 0.012681 *  
## stateRI                             -0.928886   0.541885  -1.714 0.086598 .  
## stateSC                             -0.356814   0.297781  -1.198 0.230916    
## stateSD                             -0.209891   0.268968  -0.780 0.435243    
## stateTN                             -0.323619   0.271816  -1.191 0.233909    
## stateTX                             -0.374700   0.262914  -1.425 0.154206    
## stateUT                              0.630887   0.310502   2.032 0.042257 *  
## stateVA                             -0.922133   0.264586  -3.485 0.000499 ***
## stateVT                             -1.011548   0.358920  -2.818 0.004859 ** 
## stateWA                             -0.294631   0.291214  -1.012 0.311746    
## stateWI                             -0.667468   0.274734  -2.430 0.015176 *  
## stateWV                             -0.820812   0.284298  -2.887 0.003915 ** 
## stateWY                              0.036770   0.319183   0.115 0.908295    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9556 on 3063 degrees of freedom
##   (11 observations deleted due to missingness)
## Multiple R-squared:  0.3831, Adjusted R-squared:  0.3714 
## F-statistic:  32.8 on 58 and 3063 DF,  p-value: < 2.2e-16

Economic Dimension and Causality

### economic dimension  VS causality log normalized plot

cor.test(df$causality_log, df$per_below_poverty_norm) #okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_below_poverty_norm
## t = -4.864, df = 3131, p-value = 1.207e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.12125061 -0.05173809
## sample estimates:
##         cor 
## -0.08659975
cor.test(df$causality_log, df$median_hh_income_1999_norm)#okay # remove because highly correlated with per_below_poverty_norm and college 
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$median_hh_income_1999_norm
## t = 13.492, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2010409 0.2672341
## sample estimates:
##       cor 
## 0.2344092
cor.test(df$causality_log, df$per_rent_norm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_rent_norm
## t = 11.816, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1728367 0.2398877
## sample estimates:
##       cor 
## 0.2066048
cor.test(df$causality_log, df$per_no_carnorm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_no_carnorm
## t = 3.5238, df = 3131, p-value = 0.0004314
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.02789407 0.09765486
## sample estimates:
##        cor 
## 0.06285124
cor.test(df$causality_log, df$per_college_or_higher_norm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_college_or_higher_norm
## t = 14.726, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2214552 0.2869612
## sample estimates:
##       cor 
## 0.2545001
cor.test(df$causality_log, df$average_hh_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$average_hh_norm
## t = 4.7925, df = 3131, p-value = 1.724e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.05046896 0.11999667
## sample estimates:
##       cor 
## 0.0853367
cor.test(df$causality_log, df$per_lack_plumbing_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_lack_plumbing_norm
## t = -6.1403, df = 3131, p-value = 9.271e-10
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.14355171 -0.07434693
## sample estimates:
##        cor 
## -0.1090815
cor.test(df$causality_log, df$per_lack_kitchen_norm) #okay # remove because highly correlated with lack of plumbing
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_lack_kitchen_norm
## t = -8.9688, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1922176 -0.1239327
## sample estimates:
##        cor 
## -0.1582644
cor.test(df$causality_log, df$per_mobile_home_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_mobile_home_norm
## t = -7.6441, df = 3131, p-value = 2.78e-14
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1695680 -0.1008124
## sample estimates:
##        cor 
## -0.1353532
cor.test(df$causality_log, df$per_unemployed_norm)## not statistically significant
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_unemployed_norm
## t = -0.2848, df = 3131, p-value = 0.7758
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.04010104  0.02993427
## sample estimates:
##         cor 
## -0.00508963
X<-df%>%
  select(
         per_below_poverty_norm,
         per_rent_norm,
         per_no_carnorm,
         per_college_or_higher_norm,
         per_lack_plumbing_norm,
         per_mobile_home_norm) 
        
ggpairs(X)

econ_causality <- lm(causality_log~(per_below_poverty_norm+
         per_rent_norm+
         per_no_carnorm+
         per_college_or_higher_norm+
         per_lack_plumbing_norm+
         per_mobile_home_norm)+
                        log_pop_2000+numb_haz_log+state,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(econ_causality)
## 
## Call:
## lm(formula = causality_log ~ (per_below_poverty_norm + per_rent_norm + 
##     per_no_carnorm + per_college_or_higher_norm + per_lack_plumbing_norm + 
##     per_mobile_home_norm) + log_pop_2000 + numb_haz_log + state, 
##     data = df, na.rm = TRUE)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.5649 -0.6535 -0.1070  0.5386  4.3432 
## 
## Coefficients:
##                             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                -3.982480   0.352838 -11.287  < 2e-16 ***
## per_below_poverty_norm     -0.080377   0.040967  -1.962  0.04986 *  
## per_rent_norm               0.056487   0.027526   2.052  0.04024 *  
## per_no_carnorm              0.003174   0.035302   0.090  0.92836    
## per_college_or_higher_norm  0.048820   0.026003   1.878  0.06054 .  
## per_lack_plumbing_norm      0.070948   0.028053   2.529  0.01149 *  
## per_mobile_home_norm        0.024085   0.029251   0.823  0.41035    
## log_pop_2000                0.373100   0.019920  18.730  < 2e-16 ***
## numb_haz_log                0.678154   0.048996  13.841  < 2e-16 ***
## stateAL                     0.989367   0.325817   3.037  0.00241 ** 
## stateAR                     0.535397   0.318726   1.680  0.09310 .  
## stateAZ                     0.794574   0.383972   2.069  0.03860 *  
## stateCA                    -0.073217   0.323236  -0.227  0.82082    
## stateCO                     0.601070   0.319147   1.883  0.05975 .  
## stateCT                    -0.498626   0.448735  -1.111  0.26658    
## stateDE                     1.128203   0.627761   1.797  0.07240 .  
## stateFL                     0.645392   0.327770   1.969  0.04904 *  
## stateGA                     0.065672   0.311770   0.211  0.83318    
## stateIA                    -0.127175   0.313010  -0.406  0.68455    
## stateID                     0.545231   0.333562   1.635  0.10224    
## stateIL                     0.372610   0.313049   1.190  0.23404    
## stateIN                    -0.016515   0.314229  -0.053  0.95809    
## stateKS                     0.440469   0.312215   1.411  0.15841    
## stateKY                     0.227268   0.312897   0.726  0.46769    
## stateLA                     0.295365   0.327545   0.902  0.36726    
## stateMA                    -0.210612   0.388963  -0.541  0.58822    
## stateMD                     0.365951   0.354146   1.033  0.30153    
## stateME                    -0.011515   0.372229  -0.031  0.97532    
## stateMI                    -0.022618   0.312870  -0.072  0.94237    
## stateMN                     0.037174   0.312476   0.119  0.90531    
## stateMO                     0.823752   0.310364   2.654  0.00799 ** 
## stateMS                     0.477720   0.324328   1.473  0.14087    
## stateMT                     0.702936   0.326026   2.156  0.03116 *  
## stateNC                    -0.106752   0.315246  -0.339  0.73491    
## stateND                     0.182730   0.325561   0.561  0.57465    
## stateNE                     0.307618   0.315240   0.976  0.32923    
## stateNH                     0.297931   0.420599   0.708  0.47878    
## stateNJ                     0.506725   0.360563   1.405  0.16001    
## stateNM                     0.012378   0.343806   0.036  0.97128    
## stateNV                     0.875480   0.380453   2.301  0.02145 *  
## stateNY                    -0.284331   0.315079  -0.902  0.36691    
## stateOH                    -0.412280   0.314662  -1.310  0.19022    
## stateOK                     0.261583   0.320127   0.817  0.41392    
## stateOR                    -0.206217   0.338200  -0.610  0.54207    
## statePA                    -0.009654   0.313816  -0.031  0.97546    
## stateRI                    -0.330060   0.561082  -0.588  0.55640    
## stateSC                     0.400225   0.334803   1.195  0.23202    
## stateSD                     0.367743   0.324548   1.133  0.25726    
## stateTN                     0.337236   0.316683   1.065  0.28701    
## stateTX                     0.298378   0.305037   0.978  0.32807    
## stateUT                     1.065270   0.344410   3.093  0.00200 ** 
## stateVA                    -0.270206   0.305956  -0.883  0.37722    
## stateVT                    -0.491323   0.387453  -1.268  0.20486    
## stateWA                     0.269121   0.334443   0.805  0.42106    
## stateWI                    -0.048814   0.313436  -0.156  0.87625    
## stateWV                    -0.143369   0.321466  -0.446  0.65564    
## stateWY                     0.553211   0.358973   1.541  0.12340    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9546 on 3065 degrees of freedom
##   (11 observations deleted due to missingness)
## Multiple R-squared:  0.384,  Adjusted R-squared:  0.3728 
## F-statistic: 34.12 on 56 and 3065 DF,  p-value: < 2.2e-16

Health Dimension and Causality

cor.test(df$causality_log, df$life_expectancy_2000_norm) # not okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$life_expectancy_2000_norm
## t = -0.82059, df = 3131, p-value = 0.4119
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.04965661  0.02036547
## sample estimates:
##         cor 
## -0.01466355
cor.test(df$causality_log, df$per_hypertension_2001_norm)# OKAY # remove due to high correlation
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_hypertension_2001_norm
## t = -2.4116, df = 3131, p-value = 0.01594
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.077960119 -0.008052692
## sample estimates:
##         cor 
## -0.04305911
# cor.test(df$causality_log, df$per_heart_disease_35_65_norm)# not okay
# cor.test(df$causality_log, df$per_heart_disease_65_more_norm)# not okay
# cor.test(df$causality_log, df$per_stroke_35_65_norm) # OKAY
# cor.test(df$causality_log, df$per_stroke_65_more_norm) #not okay 
cor.test(df$causality_log, df$per_diabetes_2000_norm)# not okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_diabetes_2000_norm
## t = -0.80988, df = 3131, p-value = 0.4181
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.04946562  0.02055686
## sample estimates:
##         cor 
## -0.01447212
cor.test(df$causality_log, df$per_disability_norm)# OKAY
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_disability_norm
## t = -3.3577, df = 3131, p-value = 0.0007954
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.09471831 -0.02493216
## sample estimates:
##         cor 
## -0.05989842
cor.test(df$causality_log, df$per_nursingnorm)# OKAY
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_nursingnorm
## t = -10.242, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2137186 -0.1459492
## sample estimates:
##        cor 
## -0.1800475
X<-df%>%
  select(
         per_disability_norm,
         per_nursingnorm) 
        
ggpairs(X)

health_causality <- lm(causality_log~(
         per_disability_norm+
         per_nursingnorm)+
                        log_pop_2000+numb_haz_log+state,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(health_causality)
## 
## Call:
## lm(formula = causality_log ~ (per_disability_norm + per_nursingnorm) + 
##     log_pop_2000 + numb_haz_log + state, data = df, na.rm = TRUE)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.5182 -0.6635 -0.0972  0.5381  4.3410 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)         -3.599314   0.254992 -14.115  < 2e-16 ***
## per_disability_norm -0.008189   0.024371  -0.336 0.736879    
## per_nursingnorm     -0.017086   0.020115  -0.849 0.395709    
## log_pop_2000         0.395212   0.017102  23.109  < 2e-16 ***
## numb_haz_log         0.670764   0.049000  13.689  < 2e-16 ***
## stateAL              0.338424   0.253420   1.335 0.181835    
## stateAR             -0.079760   0.249973  -0.319 0.749691    
## stateAZ              0.214814   0.332258   0.647 0.517986    
## stateCA             -0.637680   0.255133  -2.499 0.012492 *  
## stateCO              0.104764   0.246562   0.425 0.670938    
## stateCT             -1.026559   0.405623  -2.531 0.011429 *  
## stateDE              0.533533   0.595910   0.895 0.370684    
## stateFL              0.015181   0.252694   0.060 0.952098    
## stateGA             -0.548739   0.232381  -2.361 0.018269 *  
## stateIA             -0.708081   0.238273  -2.972 0.002984 ** 
## stateID             -0.035843   0.260253  -0.138 0.890466    
## stateIL             -0.236635   0.238047  -0.994 0.320267    
## stateIN             -0.621284   0.241262  -2.575 0.010066 *  
## stateKS             -0.104524   0.237014  -0.441 0.659242    
## stateKY             -0.408352   0.240989  -1.694 0.090275 .  
## stateLA             -0.388484   0.251085  -1.547 0.121913    
## stateMA             -0.700398   0.339819  -2.061 0.039378 *  
## stateMD             -0.205337   0.294270  -0.698 0.485365    
## stateME             -0.541491   0.326093  -1.661 0.096908 .  
## stateMI             -0.641287   0.242474  -2.645 0.008216 ** 
## stateMN             -0.552613   0.241006  -2.293 0.021918 *  
## stateMO              0.221749   0.237254   0.935 0.350042    
## stateMS             -0.200866   0.246794  -0.814 0.415765    
## stateMT              0.165590   0.253190   0.654 0.513151    
## stateNC             -0.704214   0.242245  -2.907 0.003675 ** 
## stateND             -0.384153   0.253496  -1.515 0.129769    
## stateNE             -0.234485   0.239199  -0.980 0.327019    
## stateNH             -0.206410   0.374381  -0.551 0.581444    
## stateNJ             -0.038764   0.306412  -0.127 0.899337    
## stateNM             -0.575211   0.274941  -2.092 0.036509 *  
## stateNV              0.348571   0.318791   1.093 0.274298    
## stateNY             -0.845044   0.252303  -3.349 0.000820 ***
## stateOH             -1.031752   0.242904  -4.248 2.23e-05 ***
## stateOK             -0.350427   0.246297  -1.423 0.154900    
## stateOR             -0.751280   0.270321  -2.779 0.005482 ** 
## statePA             -0.610288   0.249650  -2.445 0.014558 *  
## stateRI             -0.847416   0.527437  -1.607 0.108230    
## stateSC             -0.232418   0.264232  -0.880 0.379146    
## stateSD             -0.203003   0.247533  -0.820 0.412221    
## stateTN             -0.293260   0.244218  -1.201 0.229917    
## stateTX             -0.306213   0.226686  -1.351 0.176853    
## stateUT              0.497085   0.278815   1.783 0.074710 .  
## stateVA             -0.826948   0.233684  -3.539 0.000408 ***
## stateVT             -1.000771   0.334966  -2.988 0.002833 ** 
## stateWA             -0.280852   0.268566  -1.046 0.295761    
## stateWI             -0.624061   0.245303  -2.544 0.011006 *  
## stateWV             -0.777076   0.257726  -3.015 0.002590 ** 
## stateWY              0.034153   0.294374   0.116 0.907644    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.957 on 3069 degrees of freedom
##   (11 observations deleted due to missingness)
## Multiple R-squared:  0.3801, Adjusted R-squared:  0.3696 
## F-statistic: 36.18 on 52 and 3069 DF,  p-value: < 2.2e-16

Institutional Dimension and Causality

cor.test(df$causality_log, df$FEMA_total_norm) # okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$FEMA_total_norm
## t = 10.953, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1581372 0.2255931
## sample estimates:
##      cor 
## 0.192092
cor.test(df$causality_log, df$number_research_institutions_norm) # okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$number_research_institutions_norm
## t = 13.29, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1976626 0.2639642
## sample estimates:
##       cor 
## 0.2310816
cor.test(df$causality_log, df$employees_2001_norm) # okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$employees_2001_norm
## t = 19.836, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.3026446 0.3648715
## sample estimates:
##       cor 
## 0.3341221
X<-df%>%
  select(
         FEMA_total,
         number_research_institutions,
         employees_2001) 
        
ggpairs(X)

inst_causality <- lm(causality_log~(FEMA_total_norm+
         number_research_institutions_norm+
         employees_2001_norm)+
                        log_pop_2000+numb_haz_log+state,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(inst_causality)
## 
## Call:
## lm(formula = causality_log ~ (FEMA_total_norm + number_research_institutions_norm + 
##     employees_2001_norm) + log_pop_2000 + numb_haz_log + state, 
##     data = df, na.rm = TRUE)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.6884 -0.6568 -0.1011  0.5372  4.3724 
## 
## Coefficients:
##                                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                       -3.08671    0.26265 -11.752  < 2e-16 ***
## FEMA_total_norm                    0.10397    0.01790   5.807 7.02e-09 ***
## number_research_institutions_norm  0.04246    0.02170   1.956 0.050508 .  
## employees_2001_norm                0.07875    0.02386   3.300 0.000976 ***
## log_pop_2000                       0.34395    0.01763  19.510  < 2e-16 ***
## numb_haz_log                       0.68021    0.04843  14.044  < 2e-16 ***
## stateAL                            0.35147    0.24236   1.450 0.147107    
## stateAR                           -0.08232    0.23862  -0.345 0.730118    
## stateAZ                            0.22265    0.32534   0.684 0.493806    
## stateCA                           -0.71355    0.24958  -2.859 0.004278 ** 
## stateCO                            0.10436    0.24300   0.429 0.667613    
## stateCT                           -1.00925    0.39928  -2.528 0.011532 *  
## stateDE                            0.57499    0.58822   0.978 0.328392    
## stateFL                           -0.06835    0.24378  -0.280 0.779193    
## stateGA                           -0.53550    0.22494  -2.381 0.017344 *  
## stateIA                           -0.71817    0.23239  -3.090 0.002017 ** 
## stateID                           -0.03406    0.25636  -0.133 0.894328    
## stateIL                           -0.23062    0.23219  -0.993 0.320664    
## stateIN                           -0.59069    0.23453  -2.519 0.011833 *  
## stateKS                           -0.14452    0.23083  -0.626 0.531294    
## stateKY                           -0.41236    0.22896  -1.801 0.071798 .  
## stateLA                           -0.48288    0.24412  -1.978 0.048017 *  
## stateMA                           -0.75500    0.33450  -2.257 0.024073 *  
## stateMD                           -0.15630    0.28884  -0.541 0.588459    
## stateME                           -0.48716    0.31954  -1.525 0.127472    
## stateMI                           -0.60613    0.23703  -2.557 0.010600 *  
## stateMN                           -0.54009    0.23557  -2.293 0.021931 *  
## stateMO                            0.21693    0.22960   0.945 0.344836    
## stateMS                           -0.23919    0.23707  -1.009 0.313094    
## stateMT                            0.13557    0.24859   0.545 0.585556    
## stateNC                           -0.67369    0.23318  -2.889 0.003891 ** 
## stateND                           -0.43910    0.24840  -1.768 0.077205 .  
## stateNE                           -0.28803    0.23327  -1.235 0.217022    
## stateNH                           -0.14381    0.36831  -0.390 0.696222    
## stateNJ                            0.01179    0.30025   0.039 0.968692    
## stateNM                           -0.56461    0.26888  -2.100 0.035821 *  
## stateNV                            0.35312    0.31315   1.128 0.259562    
## stateNY                           -0.86173    0.24660  -3.494 0.000482 ***
## stateOH                           -0.99456    0.23639  -4.207 2.66e-05 ***
## stateOK                           -0.36006    0.23801  -1.513 0.130429    
## stateOR                           -0.72344    0.26517  -2.728 0.006403 ** 
## statePA                           -0.55982    0.24399  -2.294 0.021832 *  
## stateRI                           -0.85590    0.52132  -1.642 0.100736    
## stateSC                           -0.18870    0.25514  -0.740 0.459595    
## stateSD                           -0.24147    0.24294  -0.994 0.320336    
## stateTN                           -0.28151    0.23360  -1.205 0.228255    
## stateTX                           -0.33473    0.21995  -1.522 0.128143    
## stateUT                            0.49607    0.27530   1.802 0.071654 .  
## stateVA                           -0.80542    0.22758  -3.539 0.000407 ***
## stateVT                           -0.96781    0.33036  -2.930 0.003419 ** 
## stateWA                           -0.26146    0.26277  -0.995 0.319807    
## stateWI                           -0.58868    0.24040  -2.449 0.014392 *  
## stateWV                           -0.76913    0.24763  -3.106 0.001913 ** 
## stateWY                            0.03571    0.29000   0.123 0.901998    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9461 on 3068 degrees of freedom
##   (11 observations deleted due to missingness)
## Multiple R-squared:  0.3944, Adjusted R-squared:  0.384 
## F-statistic:  37.7 on 53 and 3068 DF,  p-value: < 2.2e-16

Environmental Dimension and Causality

cor.test(df$causality_log, df$air_quality_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$air_quality_norm
## t = 20.882, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.3190083 0.3805750
## sample estimates:
##       cor 
## 0.3501698
cor.test(df$causality_log, df$water_quality_norm)# not statistically significant
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$water_quality_norm
## t = 0.54829, df = 3120, p-value = 0.5835
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.02527340  0.04488026
## sample estimates:
##         cor 
## 0.009815506
cor.test(df$causality_log, df$built_quality_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$built_quality_norm
## t = 14.999, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2263162 0.2917633
## sample estimates:
##       cor 
## 0.2593375
cor.test(df$causality_log, df$land_quality_norm)#not statistically significan
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$land_quality_norm
## t = -0.78107, df = 3120, p-value = 0.4348
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.04903820  0.02110851
## sample estimates:
##         cor 
## -0.01398205
cor.test(df$causality_log, df$impervious_surface_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$impervious_surface_norm
## t = 16.106, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2443535 0.3091345
## sample estimates:
##       cor 
## 0.2770588
X<-df%>%
  select(
         air_quality_norm,
         built_quality_norm,
         impervious_surface_norm) 
        
ggpairs(X)
## Warning: Removed 11 rows containing non-finite values (`stat_density()`).
## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values
## Warning: Removed 11 rows containing missing values (`geom_point()`).
## Warning: Removed 11 rows containing non-finite values (`stat_density()`).
## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values
## Warning: Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Warning: Removed 11 rows containing non-finite values (`stat_density()`).

environ_causality <- lm(causality_log~(air_quality_norm+
         built_quality_norm+
         impervious_surface_norm)+
                        log_pop_2000+numb_haz_log+state,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(environ_causality)
## 
## Call:
## lm(formula = causality_log ~ (air_quality_norm + built_quality_norm + 
##     impervious_surface_norm) + log_pop_2000 + numb_haz_log + 
##     state, data = df, na.rm = TRUE)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.6721 -0.6632 -0.1004  0.5426  4.4066 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             -4.716808   0.411355 -11.467  < 2e-16 ***
## air_quality_norm        -0.222995   0.045630  -4.887 1.08e-06 ***
## built_quality_norm       0.007076   0.021814   0.324  0.74568    
## impervious_surface_norm  0.109649   0.021469   5.107 3.47e-07 ***
## log_pop_2000             0.474253   0.030792  15.402  < 2e-16 ***
## numb_haz_log             0.687336   0.048840  14.073  < 2e-16 ***
## stateAL                  0.680344   0.254964   2.668  0.00766 ** 
## stateAR                  0.154530   0.245971   0.628  0.52989    
## stateAZ                  0.403402   0.328784   1.227  0.21993    
## stateCA                 -0.472170   0.252360  -1.871  0.06144 .  
## stateCO                  0.161579   0.244716   0.660  0.50913    
## stateCT                 -0.743136   0.406302  -1.829  0.06749 .  
## stateDE                  0.801704   0.593205   1.351  0.17664    
## stateFL                  0.238785   0.249738   0.956  0.33908    
## stateGA                 -0.208053   0.239390  -0.869  0.38486    
## stateIA                 -0.412339   0.243320  -1.695  0.09025 .  
## stateID                  0.239088   0.263664   0.907  0.36459    
## stateIL                  0.117975   0.247082   0.477  0.63306    
## stateIN                 -0.209991   0.252899  -0.830  0.40641    
## stateKS                  0.094281   0.237696   0.397  0.69166    
## stateKY                 -0.027444   0.246169  -0.111  0.91124    
## stateLA                 -0.012255   0.257839  -0.048  0.96209    
## stateMA                 -0.548262   0.341200  -1.607  0.10819    
## stateMD                  0.143967   0.300700   0.479  0.63213    
## stateME                 -0.209761   0.327271  -0.641  0.52161    
## stateMI                 -0.357101   0.246128  -1.451  0.14692    
## stateMN                 -0.319086   0.242636  -1.315  0.18858    
## stateMO                  0.492934   0.239694   2.057  0.03982 *  
## stateMS                  0.180566   0.252909   0.714  0.47531    
## stateMT                  0.263939   0.251006   1.052  0.29310    
## stateNC                 -0.343017   0.246729  -1.390  0.16455    
## stateND                 -0.233808   0.253114  -0.924  0.35570    
## stateNE                 -0.045317   0.240176  -0.189  0.85035    
## stateNH                  0.129117   0.375881   0.344  0.73124    
## stateNJ                  0.152805   0.311542   0.490  0.62383    
## stateNM                 -0.386943   0.272616  -1.419  0.15589    
## stateNV                  0.503350   0.316320   1.591  0.11165    
## stateNY                 -0.582357   0.256085  -2.274  0.02303 *  
## stateOH                 -0.652128   0.252280  -2.585  0.00979 ** 
## stateOK                 -0.125074   0.244999  -0.511  0.60973    
## stateOR                 -0.357151   0.277761  -1.286  0.19860    
## statePA                 -0.250306   0.256522  -0.976  0.32926    
## stateRI                 -0.667879   0.529584  -1.261  0.20735    
## stateSC                  0.156454   0.268457   0.583  0.56008    
## stateSD                 -0.062023   0.246904  -0.251  0.80167    
## stateTN                  0.073942   0.248854   0.297  0.76639    
## stateTX                 -0.057894   0.228645  -0.253  0.80013    
## stateUT                  0.647403   0.278307   2.326  0.02007 *  
## stateVA                 -0.539447   0.246161  -2.191  0.02849 *  
## stateVT                 -0.706707   0.337046  -2.097  0.03610 *  
## stateWA                  0.007356   0.270288   0.027  0.97829    
## stateWI                 -0.301898   0.250944  -1.203  0.22905    
## stateWV                 -0.354784   0.266088  -1.333  0.18252    
## stateWY                  0.256180   0.295313   0.867  0.38574    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9502 on 3068 degrees of freedom
##   (11 observations deleted due to missingness)
## Multiple R-squared:  0.3891, Adjusted R-squared:  0.3786 
## F-statistic: 36.88 on 53 and 3068 DF,  p-value: < 2.2e-16

Vulnerability using Causualties

X<-df%>%
  select(per_black_norm,
              per_hispanic_norm,
         per_asian_norm,
         per_american_indian_norm,
         per_elderly_norm,
         per_young_dependent_norm,
         per_female_hh_with_kids_under6_norm,
         per_rural_norm,
         per_below_poverty_norm,
         per_rent_norm,
         per_no_carnorm,
         per_college_or_higher_norm,
         per_lack_plumbing_norm,
         per_mobile_home_norm,

         per_disability_norm,
         per_nursingnorm,
         FEMA_total_norm,
         number_research_institutions_norm,
         employees_2001_norm,
         air_quality_norm,
         built_quality_norm,
         impervious_surface_norm) 
        
ggpairs(X)
## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values
## Warning: Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Warning: Removed 11 rows containing non-finite values (`stat_density()`).
## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values
## Warning: Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Warning: Removed 11 rows containing non-finite values (`stat_density()`).
## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values
## Warning: Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Warning: Removed 11 rows containing non-finite values (`stat_density()`).

model_causality <- lm(causality_log~(per_black_norm+
              per_hispanic_norm+
         per_asian_norm+
         per_american_indian_norm+
         per_elderly_norm+
         per_young_dependent_norm+
         per_female_hh_with_kids_under6_norm+
         per_rural_norm+
         per_below_poverty_norm+
         per_rent_norm+
         per_no_carnorm+
         per_college_or_higher_norm+
         per_lack_plumbing_norm+
         per_mobile_home_norm+

         per_disability_norm+
         per_nursingnorm+
         FEMA_total_norm+
         number_research_institutions_norm+
         employees_2001_norm+
         air_quality_norm+
         built_quality_norm+
         impervious_surface_norm)+log_pop_2000+numb_haz_log+state,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(model_causality)
## 
## Call:
## lm(formula = causality_log ~ (per_black_norm + per_hispanic_norm + 
##     per_asian_norm + per_american_indian_norm + per_elderly_norm + 
##     per_young_dependent_norm + per_female_hh_with_kids_under6_norm + 
##     per_rural_norm + per_below_poverty_norm + per_rent_norm + 
##     per_no_carnorm + per_college_or_higher_norm + per_lack_plumbing_norm + 
##     per_mobile_home_norm + per_disability_norm + per_nursingnorm + 
##     FEMA_total_norm + number_research_institutions_norm + employees_2001_norm + 
##     air_quality_norm + built_quality_norm + impervious_surface_norm) + 
##     log_pop_2000 + numb_haz_log + state, data = df, na.rm = TRUE)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.5257 -0.6503 -0.1046  0.5292  4.4376 
## 
## Coefficients:
##                                       Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                         -4.1295888  0.5014068  -8.236 2.61e-16 ***
## per_black_norm                       0.0782379  0.0349964   2.236 0.025450 *  
## per_hispanic_norm                    0.0334940  0.0487624   0.687 0.492210    
## per_asian_norm                      -0.1274496  0.0344885  -3.695 0.000223 ***
## per_american_indian_norm             0.0460675  0.0278878   1.652 0.098661 .  
## per_elderly_norm                     0.0471320  0.0356038   1.324 0.185671    
## per_young_dependent_norm             0.0023073  0.0330683   0.070 0.944379    
## per_female_hh_with_kids_under6_norm -0.0235208  0.0359975  -0.653 0.513547    
## per_rural_norm                      -0.0006099  0.0386973  -0.016 0.987426    
## per_below_poverty_norm              -0.1473569  0.0494348  -2.981 0.002897 ** 
## per_rent_norm                        0.0686678  0.0340468   2.017 0.043797 *  
## per_no_carnorm                      -0.0969694  0.0404784  -2.396 0.016654 *  
## per_college_or_higher_norm           0.0594780  0.0331587   1.794 0.072955 .  
## per_lack_plumbing_norm               0.0386440  0.0295750   1.307 0.191431    
## per_mobile_home_norm                 0.0583878  0.0323373   1.806 0.071081 .  
## per_disability_norm                  0.0404351  0.0390782   1.035 0.300880    
## per_nursingnorm                     -0.0323389  0.0233934  -1.382 0.166951    
## FEMA_total_norm                      0.0995506  0.0178811   5.567 2.81e-08 ***
## number_research_institutions_norm    0.0425839  0.0232127   1.835 0.066676 .  
## employees_2001_norm                  0.0555001  0.0261918   2.119 0.034172 *  
## air_quality_norm                    -0.1873809  0.0514384  -3.643 0.000274 ***
## built_quality_norm                  -0.0007746  0.0250669  -0.031 0.975349    
## impervious_surface_norm              0.1102979  0.0272639   4.046 5.35e-05 ***
## log_pop_2000                         0.4291093  0.0358200  11.980  < 2e-16 ***
## numb_haz_log                         0.6840068  0.0489292  13.980  < 2e-16 ***
## stateAL                              0.5307972  0.3571002   1.486 0.137274    
## stateAR                              0.0460665  0.3446009   0.134 0.893664    
## stateAZ                              0.1301507  0.4045613   0.322 0.747696    
## stateCA                             -0.4796600  0.3391579  -1.414 0.157385    
## stateCO                             -0.0338030  0.3357255  -0.101 0.919806    
## stateCT                             -0.9440840  0.4646924  -2.032 0.042277 *  
## stateDE                              0.5864810  0.6342614   0.925 0.355212    
## stateFL                             -0.1188168  0.3589015  -0.331 0.740624    
## stateGA                             -0.3926038  0.3421609  -1.147 0.251296    
## stateIA                             -0.5291097  0.3359087  -1.575 0.115323    
## stateID                              0.0808992  0.3528691   0.229 0.818681    
## stateIL                              0.0090136  0.3394437   0.027 0.978817    
## stateIN                             -0.3183960  0.3421512  -0.931 0.352149    
## stateKS                             -0.0967265  0.3352136  -0.289 0.772944    
## stateKY                             -0.0515151  0.3458494  -0.149 0.881601    
## stateLA                             -0.1668469  0.3583762  -0.466 0.641561    
## stateMA                             -0.7718993  0.4129984  -1.869 0.061717 .  
## stateMD                              0.0080794  0.3766909   0.021 0.982889    
## stateME                             -0.3525904  0.3949355  -0.893 0.372046    
## stateMI                             -0.4717241  0.3355265  -1.406 0.159849    
## stateMN                             -0.3799790  0.3300326  -1.151 0.249684    
## stateMO                              0.4038508  0.3356213   1.203 0.228956    
## stateMS                              0.0216887  0.3606576   0.060 0.952051    
## stateMT                              0.0964389  0.3429819   0.281 0.778593    
## stateNC                             -0.5809914  0.3472649  -1.673 0.094420 .  
## stateND                             -0.4039929  0.3449074  -1.171 0.241566    
## stateNE                             -0.2236737  0.3385464  -0.661 0.508862    
## stateNH                             -0.0712797  0.4379697  -0.163 0.870726    
## stateNJ                              0.1402226  0.3839816   0.365 0.715002    
## stateNM                             -0.5671149  0.3726528  -1.522 0.128155    
## stateNV                              0.2270100  0.3937347   0.577 0.564282    
## stateNY                             -0.6791204  0.3391260  -2.003 0.045313 *  
## stateOH                             -0.7383586  0.3426491  -2.155 0.031251 *  
## stateOK                             -0.2973004  0.3415152  -0.871 0.384077    
## stateOR                             -0.5759378  0.3634182  -1.585 0.113120    
## statePA                             -0.3585331  0.3434673  -1.044 0.296631    
## stateRI                             -0.8990581  0.5793549  -1.552 0.120808    
## stateSC                             -0.0589762  0.3666944  -0.161 0.872236    
## stateSD                             -0.2204046  0.3428528  -0.643 0.520367    
## stateTN                             -0.0378903  0.3471057  -0.109 0.913082    
## stateTX                             -0.2215196  0.3358333  -0.660 0.509553    
## stateUT                              0.5046767  0.3648607   1.383 0.166704    
## stateVA                             -0.7409463  0.3417316  -2.168 0.030220 *  
## stateVT                             -0.8927646  0.4042211  -2.209 0.027276 *  
## stateWA                             -0.1099006  0.3521889  -0.312 0.755024    
## stateWI                             -0.4262870  0.3349966  -1.273 0.203289    
## stateWV                             -0.3716637  0.3558655  -1.044 0.296386    
## stateWY                              0.0330549  0.3741976   0.088 0.929616    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9384 on 3049 degrees of freedom
##   (11 observations deleted due to missingness)
## Multiple R-squared:  0.4079, Adjusted R-squared:  0.3939 
## F-statistic: 29.17 on 72 and 3049 DF,  p-value: < 2.2e-16

CROP and PROPERTY DAMAGE

Social Dimension and Prop Damage

### social dimension  VS crop & property dmg
cor.test(df$prop_dmg_log, df$per_white_norm) ## okay 
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_white_norm
## t = -4.6773, df = 3131, p-value = 3.03e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.11797418 -0.04842244
## sample estimates:
##         cor 
## -0.08329975
cor.test(df$prop_dmg_log, df$per_black_norm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_black_norm
## t = 7.0168, df = 3131, p-value = 2.772e-12
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.08979735 0.15875150
## sample estimates:
##       cor 
## 0.1244246
cor.test(df$prop_dmg_log, df$per_hispanic_norm)##not statistically signif
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_hispanic_norm
## t = -1.1455, df = 3131, p-value = 0.2521
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.05544633  0.01456149
## sample estimates:
##         cor 
## -0.02046751
cor.test(df$prop_dmg_log, df$per_asian_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_asian_norm
## t = 8.6053, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1176097 0.1860306
## sample estimates:
##       cor 
## 0.1520023
cor.test(df$prop_dmg_log, df$per_american_indian_norm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_american_indian_norm
## t = -5.4325, df = 3131, p-value = 5.983e-08
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.13120609 -0.06182216
## sample estimates:
##         cor 
## -0.09663152
cor.test(df$prop_dmg_log, df$per_other_races_norm)#not statistically signif
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_other_races_norm
## t = -1.225, df = 3131, p-value = 0.2207
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.05686281  0.01314080
## sample estimates:
##         cor 
## -0.02188783
cor.test(df$prop_dmg_log, df$per_POC_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_POC_norm
## t = 2.4475, df = 3131, p-value = 0.01444
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.008692444 0.078595995
## sample estimates:
##       cor 
## 0.0436977
cor.test(df$prop_dmg_log, df$per_elderly_norm) ##okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_elderly_norm
## t = -6.5761, df = 3131, p-value = 5.638e-11
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.15112165 -0.08203754
## sample estimates:
##        cor 
## -0.1167208
cor.test(df$prop_dmg_log, df$per_young_dependent_norm)  #okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_young_dependent_norm
## t = 6.3782, df = 3131, p-value = 2.056e-10
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.07854709 0.14768697
## sample estimates:
##       cor 
## 0.1132541
cor.test(df$prop_dmg_log, df$per_noenglish_norm)# ##not statistically signif
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_noenglish_norm
## t = 1.1481, df = 3131, p-value = 0.251
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.01451503  0.05549266
## sample estimates:
##        cor 
## 0.02051396
cor.test(df$prop_dmg_log, df$per_foreign_born_norm)##okay 
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_foreign_born_norm
## t = 6.2593, df = 3131, p-value = 4.394e-10
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.07644809 0.14562071
## sample estimates:
##      cor 
## 0.111169
cor.test(df$prop_dmg_log, df$per_female_hh_with_kids_under6_norm)##okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_female_hh_with_kids_under6_norm
## t = 9.6893, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1364190 0.2044196
## sample estimates:
##       cor 
## 0.1706225
cor.test(df$prop_dmg_log, df$per_female_hh_with_kids_under18_norm)##okay - highly correlated
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_female_hh_with_kids_under18_norm
## t = 9.8602, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1393696 0.2073000
## sample estimates:
##       cor 
## 0.1735412
cor.test(df$prop_dmg_log, df$per_rural_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_rural_norm
## t = -18.518, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.3453988 -0.2822674
## sample estimates:
##        cor 
## -0.3141804
cor.test(df$prop_dmg_log, df$per_no_schooling_completed_norm) ##not statistically signif
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_no_schooling_completed_norm
## t = 0.019705, df = 3131, p-value = 0.9843
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.03466684  0.03537028
## sample estimates:
##          cor 
## 0.0003521511
X<-df%>%
  select(
         per_black_norm,
         per_asian_norm,
         per_american_indian_norm,
    per_elderly_norm,
         per_young_dependent_norm,
         per_female_hh_with_kids_under6_norm,
         per_rural_norm,
    per_foreign_born_norm) 
        
ggpairs(X)

social_damage <- lm(prop_dmg_log ~
                      per_black_norm+
         per_asian_norm+
           per_american_indian_norm+
    per_elderly_norm+
         per_young_dependent_norm+
    per_foreign_born_norm+
         per_female_hh_with_kids_under6_norm+
         per_rural_norm+
                        log_pop_2000+numb_haz_log+state+log_median_house_value,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(social_damage)
## 
## Call:
## lm(formula = prop_dmg_log ~ per_black_norm + per_asian_norm + 
##     per_american_indian_norm + per_elderly_norm + per_young_dependent_norm + 
##     per_foreign_born_norm + per_female_hh_with_kids_under6_norm + 
##     per_rural_norm + log_pop_2000 + numb_haz_log + state + log_median_house_value, 
##     data = df, na.rm = TRUE)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -13.9419  -1.0330   0.0049   1.0772   8.9121 
## 
## Coefficients:
##                                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                          2.864571   1.800054   1.591 0.111627    
## per_black_norm                      -0.039124   0.066178  -0.591 0.554438    
## per_asian_norm                      -0.033736   0.071694  -0.471 0.637990    
## per_american_indian_norm            -0.006485   0.050981  -0.127 0.898793    
## per_elderly_norm                     0.156890   0.061003   2.572 0.010163 *  
## per_young_dependent_norm            -0.020274   0.061344  -0.331 0.741042    
## per_foreign_born_norm               -0.071067   0.058435  -1.216 0.224014    
## per_female_hh_with_kids_under6_norm  0.001752   0.062416   0.028 0.977608    
## per_rural_norm                      -0.049921   0.068543  -0.728 0.466473    
## log_pop_2000                         0.591984   0.056127  10.547  < 2e-16 ***
## numb_haz_log                         3.179922   0.102314  31.080  < 2e-16 ***
## stateAL                             -2.598295   0.590199  -4.402 1.11e-05 ***
## stateAR                             -1.580918   0.578546  -2.733 0.006320 ** 
## stateAZ                             -3.381124   0.725667  -4.659 3.31e-06 ***
## stateCA                             -1.385868   0.577463  -2.400 0.016458 *  
## stateCO                             -2.922270   0.571299  -5.115 3.33e-07 ***
## stateCT                             -4.751131   0.882831  -5.382 7.93e-08 ***
## stateDE                             -2.392181   1.263974  -1.893 0.058507 .  
## stateFL                             -1.203086   0.592115  -2.032 0.042255 *  
## stateGA                             -2.437063   0.553388  -4.404 1.10e-05 ***
## stateIA                             -1.330043   0.564973  -2.354 0.018627 *  
## stateID                             -4.297769   0.601063  -7.150 1.08e-12 ***
## stateIL                             -2.594622   0.564213  -4.599 4.42e-06 ***
## stateIN                             -1.876287   0.566568  -3.312 0.000938 ***
## stateKS                             -1.166968   0.561893  -2.077 0.037899 *  
## stateKY                             -1.608774   0.558287  -2.882 0.003984 ** 
## stateLA                              0.177541   0.592607   0.300 0.764507    
## stateMA                             -2.889008   0.752969  -3.837 0.000127 ***
## stateMD                             -2.149103   0.664240  -3.235 0.001228 ** 
## stateME                             -1.130717   0.733075  -1.542 0.123072    
## stateMI                             -2.897794   0.568422  -5.098 3.64e-07 ***
## stateMN                             -1.490065   0.564452  -2.640 0.008337 ** 
## stateMO                             -2.059628   0.559488  -3.681 0.000236 ***
## stateMS                             -0.754867   0.588992  -1.282 0.200071    
## stateMT                             -3.544773   0.573711  -6.179 7.32e-10 ***
## stateNC                             -2.387758   0.565810  -4.220 2.51e-05 ***
## stateND                             -1.793823   0.584726  -3.068 0.002175 ** 
## stateNE                             -1.275049   0.564545  -2.259 0.023982 *  
## stateNH                             -1.672918   0.822484  -2.034 0.042039 *  
## stateNJ                             -2.320642   0.686005  -3.383 0.000726 ***
## stateNM                             -2.685304   0.615620  -4.362 1.33e-05 ***
## stateNV                             -1.598900   0.700552  -2.282 0.022537 *  
## stateNY                             -2.607696   0.588557  -4.431 9.72e-06 ***
## stateOH                             -1.304844   0.572036  -2.281 0.022614 *  
## stateOK                             -1.649920   0.554446  -2.976 0.002945 ** 
## stateOR                             -2.729482   0.614710  -4.440 9.30e-06 ***
## statePA                             -2.768522   0.591701  -4.679 3.01e-06 ***
## stateRI                             -4.405797   1.126050  -3.913 9.33e-05 ***
## stateSC                             -2.649981   0.619128  -4.280 1.92e-05 ***
## stateSD                             -2.492265   0.562372  -4.432 9.68e-06 ***
## stateTN                             -2.440637   0.565712  -4.314 1.65e-05 ***
## stateTX                             -1.843158   0.548359  -3.361 0.000786 ***
## stateUT                             -3.040075   0.643385  -4.725 2.40e-06 ***
## stateVA                             -2.339984   0.549351  -4.260 2.11e-05 ***
## stateVT                             -2.270864   0.745977  -3.044 0.002353 ** 
## stateWA                             -2.067238   0.605351  -3.415 0.000646 ***
## stateWI                             -1.741869   0.570725  -3.052 0.002293 ** 
## stateWV                             -1.471850   0.594037  -2.478 0.013276 *  
## stateWY                             -3.610732   0.662501  -5.450 5.43e-08 ***
## log_median_house_value               0.231394   0.162581   1.423 0.154764    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.983 on 3062 degrees of freedom
##   (11 observations deleted due to missingness)
## Multiple R-squared:  0.527,  Adjusted R-squared:  0.5179 
## F-statistic: 57.83 on 59 and 3062 DF,  p-value: < 2.2e-16

Economic Dimension & prop damage

### economic dimension  VS causality log normalized plot

cor.test(df$prop_dmg_log, df$per_below_poverty_norm) #okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_below_poverty_norm
## t = -4.4995, df = 3131, p-value = 7.059e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1148502 -0.0452625
## sample estimates:
##         cor 
## -0.08015401
cor.test(df$prop_dmg_log, df$median_hh_income_1999_norm)##okay- highly correlated
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$median_hh_income_1999_norm
## t = 10.827, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1559898 0.2235024
## sample estimates:
##       cor 
## 0.1899707
cor.test(df$prop_dmg_log, df$per_rent_norm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_rent_norm
## t = 4.9541, df = 3131, p-value = 7.652e-07
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.05333773 0.12283078
## sample estimates:
##        cor 
## 0.08819156
cor.test(df$prop_dmg_log, df$per_no_carnorm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_no_carnorm
## t = 3.5701, df = 3131, p-value = 0.0003621
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.02871948 0.09847300
## sample estimates:
##        cor 
## 0.06367401
cor.test(df$prop_dmg_log, df$per_college_or_higher_norm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_college_or_higher_norm
## t = 7.8065, df = 3131, p-value = 7.957e-15
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1036575 0.1723590
## sample estimates:
##       cor 
## 0.1381745
cor.test(df$prop_dmg_log, df$average_hh_norm)##okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$average_hh_norm
## t = 2.119, df = 3131, p-value = 0.03417
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.002826967 0.072763920
## sample estimates:
##        cor 
## 0.03784178
cor.test(df$prop_dmg_log, df$per_lack_plumbing_norm)##okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_lack_plumbing_norm
## t = -7.1554, df = 3131, p-value = 1.035e-12
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.16114655 -0.09223492
## sample estimates:
##        cor 
## -0.1268438
cor.test(df$prop_dmg_log, df$per_lack_kitchen_norm) # okay - highly correlated
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_lack_kitchen_norm
## t = -10.585, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2194695 -0.1518493
## sample estimates:
##        cor 
## -0.1858795
cor.test(df$prop_dmg_log, df$per_mobile_home_norm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_mobile_home_norm
## t = -8.5314, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1847693 -0.1163214
## sample estimates:
##       cor 
## -0.150726
cor.test(df$prop_dmg_log, df$per_unemployed_norm)## #not statistically significant
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_unemployed_norm
## t = 0.41851, df = 3131, p-value = 0.6756
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.02754666  0.04248655
## sample estimates:
##         cor 
## 0.007479114
X<-df%>%
  select(
    per_below_poverty_norm, 
         per_rent_norm,
         per_no_carnorm,
         per_college_or_higher_norm,
    average_hh_norm,
    per_lack_plumbing_norm,
         per_mobile_home_norm) 
        
ggpairs(X)

econ_damage <- lm(prop_dmg_log ~per_below_poverty_norm+ 
         per_rent_norm+
         per_no_carnorm+
         per_college_or_higher_norm+
    average_hh_norm+
    per_lack_plumbing_norm+
         per_mobile_home_norm+
                        log_pop_2000+numb_haz_log+state+log_median_house_value,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(econ_damage)
## 
## Call:
## lm(formula = prop_dmg_log ~ per_below_poverty_norm + per_rent_norm + 
##     per_no_carnorm + per_college_or_higher_norm + average_hh_norm + 
##     per_lack_plumbing_norm + per_mobile_home_norm + log_pop_2000 + 
##     numb_haz_log + state + log_median_house_value, data = df, 
##     na.rm = TRUE)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -14.0507  -1.0482   0.0025   1.0550   8.8419 
## 
## Coefficients:
##                             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                 3.356163   2.391451   1.403 0.160599    
## per_below_poverty_norm      0.220520   0.098810   2.232 0.025703 *  
## per_rent_norm              -0.207350   0.057265  -3.621 0.000298 ***
## per_no_carnorm             -0.088058   0.074049  -1.189 0.234457    
## per_college_or_higher_norm -0.007501   0.068486  -0.110 0.912793    
## average_hh_norm            -0.156698   0.050525  -3.101 0.001944 ** 
## per_lack_plumbing_norm     -0.038468   0.058612  -0.656 0.511666    
## per_mobile_home_norm       -0.042269   0.063573  -0.665 0.506175    
## log_pop_2000                0.639834   0.045769  13.980  < 2e-16 ***
## numb_haz_log                3.164582   0.101824  31.079  < 2e-16 ***
## stateAL                    -3.533324   0.689793  -5.122 3.21e-07 ***
## stateAR                    -2.320939   0.677324  -3.427 0.000619 ***
## stateAZ                    -4.022354   0.802693  -5.011 5.72e-07 ***
## stateCA                    -2.043206   0.674736  -3.028 0.002481 ** 
## stateCO                    -3.646247   0.668627  -5.453 5.34e-08 ***
## stateCT                    -5.387472   0.937751  -5.745 1.01e-08 ***
## stateDE                    -3.123608   1.308039  -2.388 0.017000 *  
## stateFL                    -1.967288   0.696083  -2.826 0.004741 ** 
## stateGA                    -3.234417   0.655637  -4.933 8.52e-07 ***
## stateIA                    -1.899870   0.665609  -2.854 0.004342 ** 
## stateID                    -4.987693   0.695220  -7.174 9.08e-13 ***
## stateIL                    -3.271902   0.665277  -4.918 9.20e-07 ***
## stateIN                    -2.573331   0.661940  -3.888 0.000103 ***
## stateKS                    -1.742517   0.670351  -2.599 0.009383 ** 
## stateKY                    -2.467604   0.661722  -3.729 0.000196 ***
## stateLA                    -0.704704   0.688865  -1.023 0.306392    
## stateMA                    -3.425639   0.814934  -4.204 2.70e-05 ***
## stateMD                    -2.843168   0.741353  -3.835 0.000128 ***
## stateME                    -1.883788   0.787559  -2.392 0.016820 *  
## stateMI                    -3.708275   0.661710  -5.604 2.28e-08 ***
## stateMN                    -2.194817   0.661412  -3.318 0.000916 ***
## stateMO                    -2.740000   0.659545  -4.154 3.35e-05 ***
## stateMS                    -1.707062   0.683584  -2.497 0.012569 *  
## stateMT                    -4.196362   0.688040  -6.099 1.20e-09 ***
## stateNC                    -3.184429   0.666707  -4.776 1.87e-06 ***
## stateND                    -2.364448   0.698446  -3.385 0.000720 ***
## stateNE                    -1.782870   0.672454  -2.651 0.008060 ** 
## stateNH                    -2.277807   0.883056  -2.579 0.009942 ** 
## stateNJ                    -2.956273   0.752812  -3.927 8.79e-05 ***
## stateNM                    -3.478517   0.722869  -4.812 1.57e-06 ***
## stateNV                    -2.215734   0.795404  -2.786 0.005375 ** 
## stateNY                    -3.181351   0.666951  -4.770 1.93e-06 ***
## stateOH                    -1.990489   0.662889  -3.003 0.002697 ** 
## stateOK                    -2.401261   0.686179  -3.499 0.000473 ***
## stateOR                    -3.270460   0.709541  -4.609 4.21e-06 ***
## statePA                    -3.400208   0.667360  -5.095 3.70e-07 ***
## stateRI                    -4.938629   1.169344  -4.223 2.48e-05 ***
## stateSC                    -3.516205   0.707792  -4.968 7.14e-07 ***
## stateSD                    -3.038163   0.691708  -4.392 1.16e-05 ***
## stateTN                    -3.267222   0.669204  -4.882 1.10e-06 ***
## stateTX                    -2.571488   0.650983  -3.950 7.99e-05 ***
## stateUT                    -3.580711   0.716547  -4.997 6.14e-07 ***
## stateVA                    -3.037916   0.644537  -4.713 2.55e-06 ***
## stateVT                    -2.971947   0.813581  -3.653 0.000264 ***
## stateWA                    -2.729914   0.700437  -3.897 9.93e-05 ***
## stateWI                    -2.384231   0.661169  -3.606 0.000316 ***
## stateWV                    -2.314410   0.682798  -3.390 0.000709 ***
## stateWY                    -4.237404   0.753263  -5.625 2.02e-08 ***
## log_median_house_value      0.210134   0.208086   1.010 0.312650    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.98 on 3063 degrees of freedom
##   (11 observations deleted due to missingness)
## Multiple R-squared:  0.5284, Adjusted R-squared:  0.5195 
## F-statistic: 59.18 on 58 and 3063 DF,  p-value: < 2.2e-16

Health Dimension & prop damage

cor.test(df$prop_dmg_log, df$life_expectancy_2000_norm) # okay- highly correlated
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$life_expectancy_2000_norm
## t = -2.3914, df = 3131, p-value = 0.01684
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.077600882 -0.007691291
## sample estimates:
##         cor 
## -0.04269835
cor.test(df$prop_dmg_log, df$per_hypertension_2001_norm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_hypertension_2001_norm
## t = 2.3197, df = 3131, p-value = 0.02042
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.006411454 0.076328564
## sample estimates:
##        cor 
## 0.04142072
cor.test(df$prop_dmg_log, df$per_heart_disease_35_65_norm)# okay- highly correlated
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_heart_disease_35_65_norm
## t = 3.1247, df = 3131, p-value = 0.001796
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.02077725 0.09059692
## sample estimates:
##        cor 
## 0.05575525
cor.test(df$prop_dmg_log, df$per_heart_disease_65_more_norm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_heart_disease_65_more_norm
## t = 6.545, df = 3131, p-value = 6.926e-11
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.08148891 0.15058190
## sample estimates:
##      cor 
## 0.116176
cor.test(df$prop_dmg_log, df$per_stroke_35_65_norm) # okay- highly correlated
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_stroke_35_65_norm
## t = 5.2268, df = 3131, p-value = 1.838e-07
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.05817545 0.12760750
## sample estimates:
##        cor 
## 0.09300454
cor.test(df$prop_dmg_log, df$per_stroke_65_more_norm) #not statistically significant
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_stroke_65_more_norm
## t = 1.6926, df = 3131, p-value = 0.09064
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.004789138  0.065184041
## sample estimates:
##        cor 
## 0.03023449
cor.test(df$prop_dmg_log, df$per_diabetes_2000_norm)# okay - highly correlated
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_diabetes_2000_norm
## t = 3.2074, df = 3131, p-value = 0.001353
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.02225242 0.09206047
## sample estimates:
##        cor 
## 0.05722639
cor.test(df$prop_dmg_log, df$per_disability_norm)# not statistically significant
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_disability_norm
## t = -0.11328, df = 3131, p-value = 0.9098
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.03704049  0.03299635
## sample estimates:
##          cor 
## -0.002024552
cor.test(df$prop_dmg_log, df$per_nursingnorm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_nursingnorm
## t = -4.3561, df = 3131, p-value = 1.367e-05
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.11232721 -0.04271147
## sample estimates:
##         cor 
## -0.07761394
X<-df%>%
  select(
    per_hypertension_2001_norm,
         per_nursingnorm) 
        
ggpairs(X)

health_damage <- lm(prop_dmg_log~(per_hypertension_2001_norm+
         per_nursingnorm)+
                        log_pop_2000+numb_haz_log+state,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(health_damage)
## 
## Call:
## lm(formula = prop_dmg_log ~ (per_hypertension_2001_norm + per_nursingnorm) + 
##     log_pop_2000 + numb_haz_log + state, data = df, na.rm = TRUE)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -13.8780  -1.0369  -0.0143   1.0453   8.9753 
## 
## Coefficients:
##                             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                 5.202368   0.531300   9.792  < 2e-16 ***
## per_hypertension_2001_norm -0.007955   0.055687  -0.143 0.886423    
## per_nursingnorm             0.068345   0.041849   1.633 0.102541    
## log_pop_2000                0.581669   0.035570  16.353  < 2e-16 ***
## numb_haz_log                3.203125   0.101641  31.514  < 2e-16 ***
## stateAL                    -2.343805   0.528351  -4.436 9.48e-06 ***
## stateAR                    -1.306833   0.512843  -2.548 0.010876 *  
## stateAZ                    -3.001020   0.683763  -4.389 1.18e-05 ***
## stateCA                    -1.076515   0.524319  -2.053 0.040141 *  
## stateCO                    -2.567863   0.511893  -5.016 5.56e-07 ***
## stateCT                    -4.286533   0.840458  -5.100 3.60e-07 ***
## stateDE                    -1.950870   1.235296  -1.579 0.114377    
## stateFL                    -0.711080   0.515234  -1.380 0.167653    
## stateGA                    -2.229510   0.485585  -4.591 4.58e-06 ***
## stateIA                    -0.917385   0.494013  -1.857 0.063406 .  
## stateID                    -3.982854   0.539324  -7.385 1.96e-13 ***
## stateIL                    -2.208568   0.493637  -4.474 7.95e-06 ***
## stateIN                    -1.544671   0.499051  -3.095 0.001984 ** 
## stateKS                    -0.836752   0.490659  -1.705 0.088228 .  
## stateKY                    -1.343949   0.491456  -2.735 0.006281 ** 
## stateLA                     0.399539   0.528566   0.756 0.449772    
## stateMA                    -2.359404   0.701980  -3.361 0.000786 ***
## stateMD                    -1.757167   0.610915  -2.876 0.004052 ** 
## stateME                    -0.684480   0.672550  -1.018 0.308883    
## stateMI                    -2.450927   0.500414  -4.898 1.02e-06 ***
## stateMN                    -1.086625   0.499770  -2.174 0.029762 *  
## stateMO                    -1.710246   0.489180  -3.496 0.000479 ***
## stateMS                    -0.596559   0.522144  -1.143 0.253328    
## stateMT                    -3.163960   0.525077  -6.026 1.88e-09 ***
## stateNC                    -2.044930   0.499608  -4.093 4.37e-05 ***
## stateND                    -1.402488   0.525754  -2.668 0.007680 ** 
## stateNE                    -0.925869   0.496295  -1.866 0.062198 .  
## stateNH                    -1.233165   0.775217  -1.591 0.111772    
## stateNJ                    -1.976154   0.634165  -3.116 0.001849 ** 
## stateNM                    -2.340536   0.565504  -4.139 3.58e-05 ***
## stateNV                    -1.238805   0.657486  -1.884 0.059638 .  
## stateNY                    -2.220393   0.520609  -4.265 2.06e-05 ***
## stateOH                    -0.922869   0.503256  -1.834 0.066781 .  
## stateOK                    -1.359796   0.506362  -2.685 0.007283 ** 
## stateOR                    -2.220876   0.557464  -3.984 6.94e-05 ***
## statePA                    -2.259489   0.515834  -4.380 1.23e-05 ***
## stateRI                    -3.888239   1.093184  -3.557 0.000381 ***
## stateSC                    -2.382545   0.551792  -4.318 1.63e-05 ***
## stateSD                    -2.170384   0.513378  -4.228 2.43e-05 ***
## stateTN                    -2.122642   0.500581  -4.240 2.30e-05 ***
## stateTX                    -1.635730   0.466663  -3.505 0.000463 ***
## stateUT                    -2.749720   0.578481  -4.753 2.09e-06 ***
## stateVA                    -1.963022   0.483720  -4.058 5.07e-05 ***
## stateVT                    -1.883574   0.694525  -2.712 0.006725 ** 
## stateWA                    -1.668328   0.553219  -3.016 0.002585 ** 
## stateWI                    -1.305897   0.508240  -2.569 0.010233 *  
## stateWV                    -1.087072   0.527235  -2.062 0.039307 *  
## stateWY                    -3.207940   0.610831  -5.252 1.61e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.986 on 3069 degrees of freedom
##   (11 observations deleted due to missingness)
## Multiple R-squared:  0.5245, Adjusted R-squared:  0.5165 
## F-statistic: 65.11 on 52 and 3069 DF,  p-value: < 2.2e-16
df$predict_health_damage <- predict(health_damage, newdata = df)

Institutional Dimension & prop damage

cor.test(df$prop_dmg_log, df$FEMA_total_norm) # okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$FEMA_total_norm
## t = 11.268, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1635275 0.2308383
## sample estimates:
##       cor 
## 0.1974156
cor.test(df$prop_dmg_log, df$number_research_institutions_norm) # okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$number_research_institutions_norm
## t = 7.3935, df = 3131, p-value = 1.826e-13
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.09641749 0.16525427
## sample estimates:
##       cor 
## 0.1309938
cor.test(df$prop_dmg_log, df$employees_2001_norm) # okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$employees_2001_norm
## t = 11.935, df = 3131, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1748624 0.2418554
## sample estimates:
##       cor 
## 0.2086036
X<-df%>%
  select(
         FEMA_total_norm,
         number_research_institutions_norm,
         employees_2001_norm) 
        
ggpairs(X)

inst_damage <- lm(prop_dmg_log~(FEMA_total_norm+
         number_research_institutions_norm+
         employees_2001_norm)+
                        log_pop_2000+numb_haz_log+state,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(inst_damage)
## 
## Call:
## lm(formula = prop_dmg_log ~ (FEMA_total_norm + number_research_institutions_norm + 
##     employees_2001_norm) + log_pop_2000 + numb_haz_log + state, 
##     data = df, na.rm = TRUE)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -13.8799  -1.0137  -0.0012   1.0548   9.0461 
## 
## Coefficients:
##                                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                        5.17897    0.54627   9.481  < 2e-16 ***
## FEMA_total_norm                    0.28143    0.03724   7.557 5.39e-14 ***
## number_research_institutions_norm  0.04567    0.04514   1.012 0.311789    
## employees_2001_norm               -0.14648    0.04962  -2.952 0.003183 ** 
## log_pop_2000                       0.57325    0.03667  15.634  < 2e-16 ***
## numb_haz_log                       3.22387    0.10073  32.004  < 2e-16 ***
## stateAL                           -2.28419    0.50406  -4.532 6.08e-06 ***
## stateAR                           -1.22507    0.49628  -2.469 0.013622 *  
## stateAZ                           -2.85437    0.67666  -4.218 2.53e-05 ***
## stateCA                           -0.83277    0.51908  -1.604 0.108746    
## stateCO                           -2.49598    0.50540  -4.939 8.29e-07 ***
## stateCT                           -4.08755    0.83043  -4.922 9.01e-07 ***
## stateDE                           -1.91872    1.22339  -1.568 0.116900    
## stateFL                           -0.90958    0.50702  -1.794 0.072913 .  
## stateGA                           -2.17938    0.46783  -4.658 3.32e-06 ***
## stateIA                           -0.81979    0.48332  -1.696 0.089958 .  
## stateID                           -3.92081    0.53319  -7.354 2.46e-13 ***
## stateIL                           -2.07303    0.48292  -4.293 1.82e-05 ***
## stateIN                           -1.42322    0.48778  -2.918 0.003551 ** 
## stateKS                           -0.72064    0.48009  -1.501 0.133440    
## stateKY                           -1.24882    0.47619  -2.622 0.008772 ** 
## stateLA                            0.13522    0.50773   0.266 0.790015    
## stateMA                           -2.25037    0.69571  -3.235 0.001231 ** 
## stateMD                           -1.63743    0.60073  -2.726 0.006453 ** 
## stateME                           -0.59332    0.66458  -0.893 0.372053    
## stateMI                           -2.35596    0.49298  -4.779 1.84e-06 ***
## stateMN                           -0.95705    0.48994  -1.953 0.050862 .  
## stateMO                           -1.60350    0.47753  -3.358 0.000795 ***
## stateMS                           -0.67333    0.49307  -1.366 0.172164    
## stateMT                           -3.05902    0.51703  -5.917 3.65e-09 ***
## stateNC                           -1.97540    0.48498  -4.073 4.76e-05 ***
## stateND                           -1.30715    0.51662  -2.530 0.011449 *  
## stateNE                           -0.79342    0.48516  -1.635 0.102074    
## stateNH                           -1.13463    0.76602  -1.481 0.138655    
## stateNJ                           -1.75920    0.62448  -2.817 0.004877 ** 
## stateNM                           -2.27930    0.55921  -4.076 4.70e-05 ***
## stateNV                           -1.18226    0.65131  -1.815 0.069589 .  
## stateNY                           -2.09060    0.51289  -4.076 4.70e-05 ***
## stateOH                           -0.79158    0.49166  -1.610 0.107495    
## stateOK                           -1.29463    0.49501  -2.615 0.008957 ** 
## stateOR                           -2.14685    0.55150  -3.893 0.000101 ***
## statePA                           -2.14701    0.50745  -4.231 2.40e-05 ***
## stateRI                           -3.82813    1.08425  -3.531 0.000421 ***
## stateSC                           -2.31633    0.53064  -4.365 1.31e-05 ***
## stateSD                           -2.06948    0.50528  -4.096 4.32e-05 ***
## stateTN                           -2.01893    0.48584  -4.156 3.33e-05 ***
## stateTX                           -1.57068    0.45745  -3.434 0.000604 ***
## stateUT                           -2.70130    0.57257  -4.718 2.49e-06 ***
## stateVA                           -1.89546    0.47332  -4.005 6.36e-05 ***
## stateVT                           -1.84325    0.68709  -2.683 0.007342 ** 
## stateWA                           -1.57210    0.54652  -2.877 0.004048 ** 
## stateWI                           -1.19721    0.49999  -2.394 0.016705 *  
## stateWV                           -1.00856    0.51502  -1.958 0.050284 .  
## stateWY                           -3.12801    0.60315  -5.186 2.29e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.968 on 3068 degrees of freedom
##   (11 observations deleted due to missingness)
## Multiple R-squared:  0.5334, Adjusted R-squared:  0.5253 
## F-statistic: 66.17 on 53 and 3068 DF,  p-value: < 2.2e-16

Environmental Dimension & prop damage

cor.test(df$prop_dmg_log, df$air_quality_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$air_quality_norm
## t = 24.727, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.3750345 0.4337107
## sample estimates:
##       cor 
## 0.4047892
cor.test(df$prop_dmg_log, df$water_quality_norm)# 
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$water_quality_norm
## t = -3.2292, df = 3120, p-value = 0.001254
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.09260756 -0.02268057
## sample estimates:
##         cor 
## -0.05771485
cor.test(df$prop_dmg_log, df$built_quality_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$built_quality_norm
## t = 11.678, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1707847 0.2380104
## sample estimates:
##       cor 
## 0.2046389
cor.test(df$prop_dmg_log, df$land_quality_norm)#not 
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$land_quality_norm
## t = -3.3154, df = 3120, p-value = 0.0009257
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.09413459 -0.02422018
## sample estimates:
##         cor 
## -0.05925005
cor.test(df$prop_dmg_log, df$impervious_surface_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$impervious_surface_norm
## t = 10.456, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1498774 0.2176656
## sample estimates:
##       cor 
## 0.1839903
X<-df%>%
  select(
         air_quality_norm,
         water_quality_norm,
         built_quality_norm,
         land_quality_norm,
         impervious_surface_norm) 
        
ggpairs(X)
## Warning: Removed 11 rows containing non-finite values (`stat_density()`).
## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values
## Warning: Removed 11 rows containing missing values (`geom_point()`).
## Warning: Removed 11 rows containing non-finite values (`stat_density()`).
## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values
## Warning: Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Warning: Removed 11 rows containing non-finite values (`stat_density()`).
## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values
## Warning: Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Warning: Removed 11 rows containing non-finite values (`stat_density()`).
## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values
## Warning: Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Warning: Removed 11 rows containing non-finite values (`stat_density()`).

env_damage <- lm(prop_dmg_log~(air_quality_norm+
         water_quality_norm+
         built_quality_norm+
           land_quality_norm+
           impervious_surface_norm
           )+
                        log_pop_2000+numb_haz_log+state,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(env_damage)
## 
## Call:
## lm(formula = prop_dmg_log ~ (air_quality_norm + water_quality_norm + 
##     built_quality_norm + land_quality_norm + impervious_surface_norm) + 
##     log_pop_2000 + numb_haz_log + state, data = df, na.rm = TRUE)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -13.9693  -1.0335  -0.0088   1.0625   9.0844 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              4.265220   0.939079   4.542 5.79e-06 ***
## air_quality_norm        -0.011171   0.095350  -0.117 0.906742    
## water_quality_norm      -0.113025   0.062836  -1.799 0.072158 .  
## built_quality_norm       0.024125   0.045656   0.528 0.597259    
## land_quality_norm       -0.099272   0.056761  -1.749 0.080400 .  
## impervious_surface_norm -0.065701   0.046143  -1.424 0.154591    
## log_pop_2000             0.611765   0.065474   9.344  < 2e-16 ***
## numb_haz_log             3.211074   0.102207  31.417  < 2e-16 ***
## stateAL                 -1.954281   0.591821  -3.302 0.000970 ***
## stateAR                 -0.666944   0.583395  -1.143 0.253040    
## stateAZ                 -2.341129   0.757558  -3.090 0.002017 ** 
## stateCA                 -0.346416   0.627994  -0.552 0.581247    
## stateCO                 -1.875605   0.612311  -3.063 0.002209 ** 
## stateCT                 -3.512105   0.908410  -3.866 0.000113 ***
## stateDE                 -1.241373   1.280337  -0.970 0.332339    
## stateFL                 -0.524613   0.564728  -0.929 0.352980    
## stateGA                 -1.729956   0.559038  -3.095 0.001989 ** 
## stateIA                 -0.226581   0.611864  -0.370 0.711175    
## stateID                 -3.284423   0.649272  -5.059 4.47e-07 ***
## stateIL                 -1.443436   0.610261  -2.365 0.018078 *  
## stateIN                 -0.760248   0.628101  -1.210 0.226222    
## stateKS                 -0.285623   0.603199  -0.474 0.635881    
## stateKY                 -0.622675   0.599084  -1.039 0.298711    
## stateLA                  0.755878   0.610106   1.239 0.215467    
## stateMA                 -1.649099   0.768886  -2.145 0.032048 *  
## stateMD                 -1.068017   0.701122  -1.523 0.127788    
## stateME                  0.008856   0.752832   0.012 0.990615    
## stateMI                 -1.840139   0.584397  -3.149 0.001655 ** 
## stateMN                 -0.317587   0.607083  -0.523 0.600917    
## stateMO                 -1.012687   0.583810  -1.735 0.082909 .  
## stateMS                 -0.277054   0.589548  -0.470 0.638430    
## stateMT                 -2.395123   0.628366  -3.812 0.000141 ***
## stateNC                 -1.367791   0.589294  -2.321 0.020348 *  
## stateND                 -0.761455   0.634527  -1.200 0.230219    
## stateNE                 -0.125045   0.600444  -0.208 0.835045    
## stateNH                 -0.535353   0.839357  -0.638 0.523643    
## stateNJ                 -1.293646   0.717088  -1.804 0.071325 .  
## stateNM                 -1.698613   0.645150  -2.633 0.008508 ** 
## stateNV                 -0.567833   0.746121  -0.761 0.446688    
## stateNY                 -1.603223   0.623780  -2.570 0.010212 *  
## stateOH                 -0.197501   0.623009  -0.317 0.751256    
## stateOK                 -0.837695   0.578708  -1.448 0.147852    
## stateOR                 -1.474484   0.675741  -2.182 0.029183 *  
## statePA                 -1.808590   0.632927  -2.858 0.004299 ** 
## stateRI                 -3.093028   1.144164  -2.703 0.006903 ** 
## stateSC                 -1.803119   0.618006  -2.918 0.003553 ** 
## stateSD                 -1.507730   0.626636  -2.406 0.016184 *  
## stateTN                 -1.522170   0.593992  -2.563 0.010436 *  
## stateTX                 -1.036589   0.543045  -1.909 0.056375 .  
## stateUT                 -2.066141   0.658967  -3.135 0.001732 ** 
## stateVA                 -1.413258   0.593433  -2.381 0.017303 *  
## stateVT                 -1.198493   0.768860  -1.559 0.119149    
## stateWA                 -1.211064   0.667535  -1.814 0.069740 .  
## stateWI                 -0.613653   0.609219  -1.007 0.313881    
## stateWV                 -0.357039   0.631932  -0.565 0.572118    
## stateWY                 -2.485299   0.694834  -3.577 0.000353 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.985 on 3066 degrees of freedom
##   (11 observations deleted due to missingness)
## Multiple R-squared:  0.5253, Adjusted R-squared:  0.5167 
## F-statistic: 61.68 on 55 and 3066 DF,  p-value: < 2.2e-16

Vulnerability using crop & prop damage

X<-df%>%
  select(
         per_black_norm,
         per_asian_norm,
    per_elderly_norm,
    per_noenglish_norm,
         per_female_hh_with_kids_under6_norm,
         per_rural_norm,
    per_below_poverty_norm, 
         per_rent_norm,
         per_no_carnorm,
         per_college_or_higher_norm,
    average_hh_norm,
    per_lack_plumbing_norm,
         per_mobile_home_norm,
    air_quality_norm,
         water_quality_norm,
         built_quality_norm,
         land_quality_norm,
         impervious_surface_norm,
         per_nursingnorm,
     FEMA_total_norm,
         number_research_institutions_norm,
         employees_2001_norm) 
        
ggpairs(X)
## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values
## Warning: Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Warning: Removed 11 rows containing non-finite values (`stat_density()`).
## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values
## Warning: Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Warning: Removed 11 rows containing non-finite values (`stat_density()`).
## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values
## Warning: Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Warning: Removed 11 rows containing non-finite values (`stat_density()`).
## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values
## Warning: Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Warning: Removed 11 rows containing non-finite values (`stat_density()`).
## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values
## Warning: Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Warning: Removed 11 rows containing non-finite values (`stat_density()`).
## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values

## Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
## Removed 11 rows containing missing values
## Warning: Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).
## Removed 11 rows containing missing values (`geom_point()`).

model_dmg <- lm(prop_dmg_log~ (per_black_norm+
         per_asian_norm+
    per_elderly_norm+
    per_noenglish_norm+
         per_female_hh_with_kids_under6_norm+
         per_rural_norm)+
                        
                        (per_nursingnorm)+
                        
                        (per_below_poverty_norm+ 
         per_rent_norm+
         per_no_carnorm+
         per_college_or_higher_norm+
    average_hh_norm+
    per_lack_plumbing_norm+
         per_mobile_home_norm)
                      
                        +  
                (FEMA_total_norm+
         number_research_institutions_norm+
         employees_2001_norm)        
                        +
          (air_quality_norm+
         water_quality_norm+
         built_quality_norm+
           land_quality_norm+
           impervious_surface_norm )+
                        log_pop_2000+numb_haz_log+state,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(model_dmg)
## 
## Call:
## lm(formula = prop_dmg_log ~ (per_black_norm + per_asian_norm + 
##     per_elderly_norm + per_noenglish_norm + per_female_hh_with_kids_under6_norm + 
##     per_rural_norm) + (per_nursingnorm) + (per_below_poverty_norm + 
##     per_rent_norm + per_no_carnorm + per_college_or_higher_norm + 
##     average_hh_norm + per_lack_plumbing_norm + per_mobile_home_norm) + 
##     (FEMA_total_norm + number_research_institutions_norm + employees_2001_norm) + 
##     (air_quality_norm + water_quality_norm + built_quality_norm + 
##         land_quality_norm + impervious_surface_norm) + log_pop_2000 + 
##     numb_haz_log + state, data = df, na.rm = TRUE)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -13.9117  -1.0234   0.0028   1.0649   9.1663 
## 
## Coefficients:
##                                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                          6.133575   1.100001   5.576 2.68e-08 ***
## per_black_norm                      -0.046819   0.067999  -0.689 0.491173    
## per_asian_norm                      -0.014160   0.071998  -0.197 0.844101    
## per_elderly_norm                     0.150988   0.082202   1.837 0.066338 .  
## per_noenglish_norm                  -0.186799   0.293024  -0.637 0.523857    
## per_female_hh_with_kids_under6_norm  0.118805   0.073310   1.621 0.105210    
## per_rural_norm                      -0.143811   0.078516  -1.832 0.067107 .  
## per_nursingnorm                      0.022557   0.046965   0.480 0.631058    
## per_below_poverty_norm               0.132165   0.096568   1.369 0.171219    
## per_rent_norm                       -0.271786   0.072752  -3.736 0.000191 ***
## per_no_carnorm                      -0.127852   0.083383  -1.533 0.125303    
## per_college_or_higher_norm           0.097757   0.065406   1.495 0.135117    
## average_hh_norm                     -0.001195   0.081989  -0.015 0.988375    
## per_lack_plumbing_norm              -0.034500   0.059857  -0.576 0.564402    
## per_mobile_home_norm                 0.068934   0.068568   1.005 0.314817    
## FEMA_total_norm                      0.288967   0.037395   7.727 1.48e-14 ***
## number_research_institutions_norm    0.081085   0.048363   1.677 0.093726 .  
## employees_2001_norm                 -0.131824   0.054504  -2.419 0.015639 *  
## air_quality_norm                    -0.001464   0.105738  -0.014 0.988957    
## water_quality_norm                  -0.099260   0.062269  -1.594 0.111029    
## built_quality_norm                  -0.027230   0.052658  -0.517 0.605116    
## land_quality_norm                   -0.055001   0.058040  -0.948 0.343381    
## impervious_surface_norm              0.054222   0.058554   0.926 0.354509    
## log_pop_2000                         0.598127   0.074553   8.023 1.46e-15 ***
## numb_haz_log                         3.216028   0.101818  31.586  < 2e-16 ***
## stateAL                             -3.778256   0.792980  -4.765 1.98e-06 ***
## stateAR                             -2.410592   0.769724  -3.132 0.001754 ** 
## stateAZ                             -4.019894   0.909566  -4.420 1.02e-05 ***
## stateCA                             -1.634443   0.786012  -2.079 0.037663 *  
## stateCO                             -3.456676   0.777166  -4.448 8.99e-06 ***
## stateCT                             -5.182676   1.020742  -5.077 4.06e-07 ***
## stateDE                             -3.273824   1.366629  -2.396 0.016656 *  
## stateFL                             -2.774593   0.784352  -3.537 0.000410 ***
## stateGA                             -3.419064   0.759902  -4.499 7.07e-06 ***
## stateIA                             -2.072677   0.778442  -2.663 0.007795 ** 
## stateID                             -5.006705   0.813743  -6.153 8.61e-10 ***
## stateIL                             -3.300871   0.782859  -4.216 2.55e-05 ***
## stateIN                             -2.564363   0.791777  -3.239 0.001213 ** 
## stateKS                             -2.109034   0.777087  -2.714 0.006684 ** 
## stateKY                             -2.418756   0.785049  -3.081 0.002081 ** 
## stateLA                             -1.330125   0.805633  -1.651 0.098835 .  
## stateMA                             -3.448308   0.905297  -3.809 0.000142 ***
## stateMD                             -2.727861   0.845809  -3.225 0.001272 ** 
## stateME                             -1.718621   0.883373  -1.946 0.051804 .  
## stateMI                             -3.708460   0.756064  -4.905 9.83e-07 ***
## stateMN                             -2.202305   0.766574  -2.873 0.004095 ** 
## stateMO                             -2.813579   0.763928  -3.683 0.000234 ***
## stateMS                             -2.143115   0.796772  -2.690 0.007190 ** 
## stateMT                             -4.167146   0.801879  -5.197 2.16e-07 ***
## stateNC                             -3.110131   0.785152  -3.961 7.63e-05 ***
## stateND                             -2.634533   0.803478  -3.279 0.001054 ** 
## stateNE                             -1.898465   0.778565  -2.438 0.014809 *  
## stateNH                             -2.171100   0.959492  -2.263 0.023721 *  
## stateNJ                             -2.935751   0.854897  -3.434 0.000603 ***
## stateNM                             -3.683843   0.822705  -4.478 7.82e-06 ***
## stateNV                             -2.184398   0.900024  -2.427 0.015280 *  
## stateNY                             -3.128163   0.777010  -4.026 5.81e-05 ***
## stateOH                             -1.980036   0.791220  -2.503 0.012384 *  
## stateOK                             -2.668082   0.765587  -3.485 0.000499 ***
## stateOR                             -3.174767   0.840079  -3.779 0.000160 ***
## statePA                             -3.538489   0.794177  -4.456 8.67e-06 ***
## stateRI                             -5.167139   1.242857  -4.157 3.31e-05 ***
## stateSC                             -3.579631   0.814992  -4.392 1.16e-05 ***
## stateSD                             -3.277706   0.802607  -4.084 4.54e-05 ***
## stateTN                             -3.285390   0.781226  -4.205 2.68e-05 ***
## stateTX                             -2.793664   0.739818  -3.776 0.000162 ***
## stateUT                             -3.799232   0.816689  -4.652 3.43e-06 ***
## stateVA                             -3.181199   0.773707  -4.112 4.03e-05 ***
## stateVT                             -2.844917   0.896528  -3.173 0.001522 ** 
## stateWA                             -2.833553   0.821982  -3.447 0.000574 ***
## stateWI                             -2.317237   0.767123  -3.021 0.002543 ** 
## stateWV                             -2.243051   0.805734  -2.784 0.005405 ** 
## stateWY                             -4.194137   0.848876  -4.941 8.20e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.959 on 3049 degrees of freedom
##   (11 observations deleted due to missingness)
## Multiple R-squared:  0.5403, Adjusted R-squared:  0.5295 
## F-statistic: 49.78 on 72 and 3049 DF,  p-value: < 2.2e-16